-- card: 3782 from stack: in -- bmap block id: 0 -- flags: 4000 -- background id: 3544 -- name: -- part 1 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=7 top=59 right=286 bottom=504 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 34 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: help -- part 2 (button) -- low flags: 00 -- high flags: 8002 -- rect: left=13 top=80 right=104 bottom=114 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Dump Data ... ----- HyperTalk script ----- on mouseUp global cardList, dumpFile set cursor to 4 push card set lockscreen to true -- Make a list of items for the xcmd put cardList & "," & "All" into tempList -- Convert semicolons to commas repeat with x = 1 to length of tempList if char x of tempList = return then put "," into char x of tempList end if end repeat put "Pick the card types to dump." DoList "Dump","Cancel", tempList, DIS put empty hide message if the result is empty then exit mouseUp put the result into bkgndList put item 1 of bkgndList into numBkgnd if "All" is in bkgndList then put item 1 of tempList into bkgndList repeat with x = 2 to number of items in tempList put bkgndList & "," & item x of tempList into bkgndList end repeat answer bkgndList put the number of items in bkgndList into numBkgnd answer numBkgnd end if -- Select a file to dump to put NewFileName("Save dump to",dumpFile) into temp if temp is empty then exit mouseUp set cursor to 4 put temp into dumpFile open file dumpFile repeat with x = 1 to numBkgnd -- item x+1 of bkgndList is the background to dump put item x+1 of bkgndList into bkgndName go to card 1 of bkgnd bkgndName put the number of cards of this bkgnd into bkgndLength -- go through the cards and write them out. repeat with y = 1 to bkgndLength go to card y of this bkgnd put "Card " & y & " of " & bkgndLength write field "card Type" to file dumpFile write tab & field "Read Status" to file dumpFile write tab & field author to file dumpFile write tab & field title to file dumpFile write tab & field key to file dumpFile write tab & field journal to file dumpFile write tab & field "Book Title" to file dumpFile write tab & field Month to file dumpFile write tab & field Year to file dumpFile write tab & field Chapter to file dumpFile write tab & field Pages to file dumpFile write tab & field "Editor" to file dumpFile write tab & field "Organization" to file dumpFile write tab & field "Publisher" to file dumpFile write tab & field "How Published" to file dumpFile write tab & field address to file dumpFile write tab & field volume to file dumpFile write tab & field series to file dumpFile write tab & field edition to file dumpFile write tab & field "Type" to file dumpFile write tab & field "Number" to file dumpFile write tab & field "Bibliography Note" to file dumpFile write tab & field notes to file dumpFile write tab & field "Key words" to file dumpFile write tab & field "location" to file dumpFile write tab to file dumpFile write return to file dumpFile end repeat end repeat close file dumpFile -- save the file name put LastPathComponent(dumpFile) into dumpFile hide message pop card end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: 8002 -- rect: left=13 top=109 right=133 bottom=114 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Fill Data ... ----- HyperTalk script ----- on mouseUp global dumpFile set cursor to 4 push card --set lockscreen to true -- Select a file to open put "Select a file with bibliography data" put FileName("TEXT") into temp put empty hide message if temp is empty then exit mouseUp set cursor to 4 put temp into dumpFile open file dumpFile repeat while true put readField(dumpFile) into cardType -- this field says card or bkgnd --put it into cardType if cardType is empty or cardType is return then exit repeat go to bkgnd cardType do "makeNewCard" play "harpsichord" "Ct6" put the number of bkgnd fields into numFields put cardType into bkgnd field "Card Type" repeat with x = 2 to numFields put readField(dumpFile) into bkgnd field x end repeat read from file dumpFile until return end repeat close file dumpFile -- save the file name put LastPathComponent(dumpFile) into dumpFile hide message pop card end mouseUp -- part contents for background part 6 ----- text ----- The last buttons -- part contents for card part 1 ----- text ----- These buttons dump bibliography information to a text file and read bibliography information from a text file. Because they are so little used, this is the only card on which they are located. The format of the text file is return return .... with a return ending the file. The data for a card is the field information, in field number order, separated by tabs: tab tab ..... tab where N is the number of bkgnd fields on a bibliography card (to find this, find the number of lines in the variable cardList).